<script>
$('#content1').xheditor({html5Upload:false,tools:'simple',upImgUrl:"{$config['webUrl']}upload.php",upImgExt:"jpg,jpeg,gif,png,bmp"});
</script>
<div style="padding: 5px; background: none repeat scroll 0% 0% rgb(239, 239, 239); text-align: right;">
    <a href="javascript:;" class="easyui-linkbutton" plain="true" id="module-post" icon="icon-save">保存</a>|
    <a href="javascript:;" class="easyui-linkbutton" plain="true" icon="icon-cancel" onclick="$('#window').window('close');">退出</a>
</div>
<form method="POST" name="theForm" id="theForm" action="index.php?action=addNew&file=catalog&submit=true">
	<div style="height: 400px;" id="game_content">
	    <div style="padding: 10px;" id="game_base">
	        <table width="100%" >
			  <tbody>
			  <tr >
			    <td>新闻标题:</td>
			    <td align="left">
			      <input gtbfieldid="1" name="title" id="title" size="40" class="easyui-validatebox validatebox-text" required="true" missingmessage="请填新闻写标题" type="text">
			    </td>
			  </tr>
			  <tr>
			    <td>来源:</td>
			    <td align="left">
			      <input gtbfieldid="2" name="source" id="source" size="40" class="easyui-validatebox validatebox-text" type="text" missingmessage="请填写来源，如原创，请填写原创，转载写明来源" value="{$config['webname']}">
			    </td>
			  </tr>
			  <tr>
			    <td>来源网址:</td>
			    <td align="left">
			      <input gtbfieldid="3" name="webUrl" id="webUrl" size="40" type="text" class="easyui-validatebox validatebox-text" missingmessage="来源网址" value="{$config['webUrl']}">
			    </td>
			  </tr>
			  <tr>
			    <td>作者:</td>
			    <td align="left">
			      <input gtbfieldid="4" name="author" id="author" size="40" type="text" class="easyui-validatebox validatebox-text" missingmessage="本文作者" value="{$userInfo['username']}">
			    </td>
			  </tr>
			  <tr>
			    <td>所属类别:</td>
			    <td align="left">
			      <select gtbfieldid="8" id="classid" name="classid" style="width: 218px;"></select>
			    </td>
			  </tr>
			  <tr>
			    <td>关键字:</td>
			    <td align="left">
			      <input gtbfieldid="4" name="keywords" id="keywords" size="40" type="text" class="easyui-validatebox validatebox-text" missingmessage="请填写关键词"></td>
			    </tr>
			  <tr>
			    <td>内容介绍:</td>
			    <td align="left"><textarea id="description" name="description" rows="5"  cols="90"></textarea></td>
			    </tr>
			  <tr>
			    <td>内容:</td>
			    <td align="left">
		<!--编辑器开始-->
		<textarea name="content" cols="90" rows="20" id="content1"></textarea>
		<!--编辑器结束-->
			    </td>
			  </tr>
		  </tbody>
		  </table>
	    </div>
	</div>
</form>
<script>
$('#classid').combotree({
    url:"./index.php?file=catalog&action=catalogTree&__c=${time()}"
});
$('#classid').combotree('setValue',{id:-1,text:'请选择分类'});

$("#module-post").click(function(){
	$('#theForm').submit();
});
$('#theForm').form({
    success:function(data){
    	JSONData = $.evalJSON(data);
    	if(JSONData.status=="error"){
    		$.messager.alert('提示信息', JSONData.msg );
    	}else{
    		window.location.reload();
    	}
    }
});

</script>
</body>
</html>